#!/usr/bin/env python
# coding=utf-8
import os
import sys
import inspect
import threading

from config import CapitalAIConfigParser

HOME_PATH = os.path.dirname(os.path.abspath(inspect.getfile(sys.modules[__name__]))) + '/../'

_config = CapitalAIConfigParser()


HTTP_PORT = _config.get_int('DEFAULT', 'HTTP', 8080)

LOG_PATH = _config.get('LOG','LOG_PATH', '/var/log/capitalai.log')

LOG_MAXBYTES = _config.get_int('LOG','LOG_MAXBYTES', 20)
LOG_BACKUPCOUNT = _config.get_int('LOG','LOG_BACKUPCOUNT', 5)

lock = threading.RLock()

